import { fromJS } from 'immutable'

export const TRADE_BID_ASK_ACTION = 'trade_bid_ask_action'

const initialState = fromJS({
  totalBid: {},
  totalAsk: {},
  bidList: [],
  askList: []
})

export default (state = initialState, action) => {
  if (action.type === TRADE_BID_ASK_ACTION) {
    return state.merge(action.data)
  }
  return state
}
